﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BUIANHQUAN.EXCERCISES.EXlv2.EX01
{
    class Triangle
    {
        double dside1, dside2, dside3;

        public Triangle() { }
        public Triangle(double side1, double side2, double side3)
        {
            dside1 = side1;
            dside2 = side2;
            dside3 = side3;
        }
        public double Area()
        {
            double a = (dside1 + dside2 + dside3) / 2;
            return Math.Sqrt(a * (a - dside1) * (a - dside2) * (a - dside3));
        }
        public double Peri()
        {
            return dside1 + dside2 + dside3;
        }
        public string toString()
        {
            return ("dside1 = " + dside1 + " dside2 = " + dside2 + " dside3 = " + dside3);
        }

        public object p { get; set; }
    }
        
}
